Acoustic echo cancellation

ABSTRACT

A method and system for acoustic echo cancellation stores received far-end data in a first buffer. When the far-end data in the first buffer exceeds a predefined length, the stored far-end data is used to calculate echo estimate data. The echo estimate data is stored in a second buffer. Whenever microphone data is received the error data is calculated independent of echo estimate data availability. In particular, subsequent to sufficient echo estimate data being stored in the second buffer and responsive to the reception of the microphone data, the error data is calculated by subtracting, from the microphone data, corresponding echo estimate data stored in the second buffer.

BACKGROUND

Acoustic Echo Cancellation (AEC) is a technique used for speechenhancement in various communication systems such as IP-Phone, dual modecellular phones, voice over WLAN etc. In a communication system,acoustic echo arises when sound from the speaker of a telephone handsetis picked up by the microphone of the handset. Due to the acoustic echo,speech data (or other audio data) received from a remote party, whenoutputted by the speaker, creates an echo of the speech (or other audiodata) of the remote party in the microphone output. The role of the AECis to identify the acoustic echo path between the speaker and themicrophone and, based on the acoustic echo path and the audio dataoutputted from the speaker, generate an estimate of the echo received bythe microphone. The estimated echo is then subtracted from themicrophone output resulting in a filtered microphone output in which theacoustic echo has been at least partially suppressed.

In AEC, adaptive filtering algorithms are used to estimate echo in themicrophone output. In adaptive filtering algorithms, an adaptive filterself-adjusts its coefficients by using a feedback signal in the form oferror signal in order to match the changing parameters. Multi DelayBlock Frequency Domain Acoustic Echo Cancellation (MDF) is an adaptivefiltering algorithm which may be used for echo estimation. MDF provideslow algorithmic complexity, low delay and fast convergence.

In the MDF algorithm, an adaptive filter of size L taps is split into Kadaptive sub-filters, each of length L/K. The step-size for adapting theadaptive sub-filters is fixed. Delay in the MDF algorithm is mainly dueto block processing delay and algorithmic delay. The block processingdelay can be reduced by decreasing the size of the adaptive sub-filters.Reducing the size of the adaptive sub-filters results in processing ofsmaller blocks of data due to which frequency domain conversion of thedata blocks results in spectral leakage, which in-turn results inlowering the convergence speed of the adaptive sub-filters. Theconvergence speed can be increased by increasing the size of adaptivesub-filters L/K (i.e. reducing the number of adaptive sub-filters K) butincreasing the size of the adaptive sub-filters tends to increase thedelay.

When the microphone data occurs, the corresponding echo estimate datamay be subtracted from the microphone data to calculate error data. Whenthe microphone data occurs, the corresponding echo estimate data may notbe present yet. In such a case, the microphone data is delayed so thatthe far-end data can occur and the echo estimate data can be calculatedfrom the far-end data. Thus, the microphone data may be delayed in orderto calculate the error data. This delay in calculating the error data isan algorithmic delay. In addition to the delay introduced in thecommunication system, uneven occurrence of the far-end data and themicrophone data affects the system's load handling capabilities.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

There is provided herein a method of error data calculation in acousticecho cancellation that comprises receiving far-end data and storing thefar-end data in a first buffer. When the far-end data in the firstbuffer exceeds a predefined length, the stored far-end data is used tocalculate echo estimate data. The echo estimate data is stored in asecond buffer. Whenever microphone data is received, the error data iscalculated (e.g. independent of echo estimate data availability). Inparticular, subsequent to sufficient echo estimate data being stored inthe second buffer, the error data is calculated responsive to thereception of the microphone data by subtracting, from the microphonedata, corresponding echo estimate data stored in the second buffer. Inthis way, the error data is calculated responsive to the reception ofthe microphone data, thus substantially avoiding a delay, caused byprocessing of the far-end data, in calculating the error data afterreception of the microphone data. Furthermore, when sufficient echoestimate data for calculating the error data is not present in thesecond buffer, the error data may be calculated based on the microphonedata and not based on the echo estimate data, and echo cancellationparameters may be reset and the received microphone data may be sent forfurther processing in the local communication device, thereby avoiding adelay caused by waiting for the occurrence of far-end data to calculatethe sufficient echo estimate data required for calculating the errordata.

There is further provided herein a processing block configured tocalculate error data in an acoustic echo canceller, that comprises areceiver module, a first buffer, an adaptive filtering module, a secondbuffer and a subtraction module. The receiver module is configured toreceive far-end data and microphone data. The far-end data received bythe receiver module is stored in the first buffer. The adaptivefiltering module is configured to calculate echo estimate data from thestored far-end data subsequent to the far-end data in the first bufferexceeding a predefined length. The echo estimate data is stored in thesecond buffer. Whenever the microphone data is received, the processingblock is configured to calculate the error data. In particular, thesubtraction module is configured to calculate the error data subsequentto sufficient echo estimate data being stored in the second buffer andresponsive to the reception of the microphone data by subtracting, fromthe microphone data, corresponding echo estimate data stored in thesecond buffer. In this way, the error data is calculated responsive tothe reception of the microphone data, and a delay, caused by processingof the far-end data in calculating the error data after reception of themicrophone data is substantially avoided. Furthermore, when sufficientecho estimate data for calculating the error data is not present in thesecond buffer, echo cancellation parameters may be reset and thereceived microphone data may be sent for further processing in the localcommunication device, thereby avoiding a delay caused by waiting for theoccurrence of far-end data to calculate the sufficient echo estimatedata required for calculating the error data.

There is still further provided herein a computer program productconfigured to calculate error data in acoustic echo cancellation,embodied on a computer-readable storage medium and configured so as whenexecuted on a processor to perform the method of receiving far-end data;storing the far-end data in a first buffer; subsequent to the far-enddata in the first buffer exceeding a predefined length, calculatingecho-estimate data using the stored far-end data; storing the echoestimate data in a second buffer; receiving microphone data; andsubsequent to sufficient echo estimate data being stored in the secondbuffer, calculating the error data responsive to the reception of themicrophone data by subtracting, from the microphone data, correspondingecho estimate data stored in the second buffer, thereby substantiallyavoiding a delay, caused by processing of the far-end data incalculating the error data after reception of the microphone data.

BRIEF DESCRIPTION OF DRAWINGS

The accompanying drawings illustrate various examples. Any person havingordinary skills in the art will appreciate that the illustrated elementboundaries (e.g., boxes, groups of boxes, or other shapes) in thefigures represent one example of the boundaries. It may be that in someexamples, one element may be designed as multiple elements or thatmultiple elements may be designed as one element. In some examples, anelement shown as an internal component of one element may be implementedas an external component in another, and vice versa. Furthermore,elements may not be drawn to scale.

Various examples will hereinafter be described in accordance with theappended drawings, which are provided to illustrate, and not to limitthe scope in any manner, wherein like designations denote similarelements, and in which:

FIG. 1 is a block diagram illustrating a system environment;

FIG. 2 is a block diagram illustrating a Frequency Domain AEC system;

FIG. 3 is a schematic block diagram representing an example architectureof an AEC system;

FIGS. 4A and 4B show a flow diagram illustrating a method for error datacalculation; and

FIG. 5 is a flow diagram illustrating a method for updating coefficientsof adaptive sub-filters.

DETAILED DESCRIPTION

The present disclosure is best understood with reference to the detailedfigures and description set forth herein. Various embodiments arediscussed below with reference to the figures. However, those skilled inthe art will readily appreciate that the detailed descriptions givenherein with respect to the figures are simply for explanatory purposesas methods and systems may extend beyond the described embodiments. Forexample, the teachings presented and the needs of a particularapplication may yield multiple alternate and suitable approaches toimplement the functionality of any detail described herein. Therefore,any approach may extend beyond the particular implementation choices inthe following embodiments described and shown.

References to “one embodiment”, “an embodiment”, “one example”, “anexample”, “for example” and so on, indicate that the embodiment(s) orexample(s) so described may include a particular feature, structure,characteristic, property, element, or limitation, but that not everyembodiment or example necessarily includes that particular feature,structure, characteristic, property, element or limitation. Furthermore,repeated use of the phrase “in an embodiment” does not necessarily referto the same embodiment.

FIG. 1 is a block diagram illustrating a system environment 100. Thesystem environment 100 includes a local party 102, a remote party 104and a network 106. The local party 102 includes a local user 108 and alocal communication device 110. The local communication device 110comprises a loudspeaker 110 a and a microphone 110 b. The remote party104 includes a remote user 112 and a remote communication device 114.Examples of the local communication device 110 and the remotecommunication device 114 may include, but are not limited to, IP-Phone,dual mode cellular phones, voice over WLAN etc.

The network 106 corresponds to a medium through which the localcommunication device 110 is communicably connected to the remotecommunication device 114 of the system environment 100. Examples of thenetwork 106 may include, but are not limited to, one or more of: aWireless Fidelity (Wi-Fi) network, a Wireless Area Network (WAN), aLocal Area Network (LAN), and a Metropolitan Area Network (MAN). Variousdevices in the system environment 100 can connect to the network 106 inaccordance with various wired and wireless communication protocols, suchas Transmission Control Protocol and Internet Protocol (TCP/IP), UserDatagram Protocol (UDP), 2G, 3G or 4G communication protocols.

The remote communication device 114 transmits audio data generated atthe remote party 104 via network 106 to the local communication device110 at the local party 102. The audio data generated at the remote party104 is played as the far-end data through the loudspeaker 110 a of thelocal communication device 110. The microphone 110 b of the localcommunication device 110 receives audio data generated by the local user108 i.e. near end data, and the far-end data outputted by theloudspeaker 110 a. The data received by the microphone 110 b of thelocal communication device 110 is microphone data and is transmitted tothe remote communication device 114 via the network 106.

FIG. 2 is a block diagram illustrating a Frequency Domain AEC system 200which is implemented at the local communication device 110.

The Frequency Domain AEC system 200 includes a processor 202, and amemory 204. The memory 204 includes a program module 206 and a programdata storage module 208. The program module 206 includes a receivermodule 210, a Fast Fourier Transformation (FFT) module 212, an adaptivefiltering module 214, a 2-D filter module 216, a subtraction module 218,a divergence control module 220, a gradient computation module 222, avirtual double talk detector (VDTD) module 224 and a variable step size(VSS) module 226. The program data storage module 208 includes a far-enddata repository 228, an echo estimate data repository 230 and an errordata repository 232. In addition to the memory 204, the processor 202may also be coupled to one or more input/output mediums (not shown).

The processor 202 executes a set of instructions stored in the memory204 to perform one or more operations. The processor 202 can be realizedthrough a number of processor technologies known in the art. Examples ofthe processor 202 include, but are not limited to, an X86 processor, areduced instruction set computing (RISC) processor, anapplication-specific integrated circuit (ASIC) processor, a complexinstruction set computing (CISC) processor, or any other processor.

The memory 204 stores a set of instructions and data. Some of thecommonly known memory implementations can be, but are not limited to, aRandom Access Memory (RAM), Read Only Memory (ROM), Hard Disk Drive(HDD), and a secure digital (SD) card. The program module 206 includes aset of instructions that are executable by the processor 202 to performspecific actions for the Frequency Domain AEC. It is understood by aperson having ordinary skills in the art that the set of instructions inconjunction with various hardware of the Frequency Domain AEC system 200enable the Frequency Domain AEC system 200 to perform variousoperations. During the execution of instructions, the far-end datarepository 228, the echo estimate data repository 230 and the error datarepository 232 may be accessed by the processor 202.

The receiver module 210 receives frames of the far-end data which havebeen sent from the remote communication device 114 and which are to beoutputted from the loudspeaker 110 a or an earpiece of the localcommunication device 110. The receiver module 210 divides the frames ofthe far-end data into sub-frames of length N_(S). For example, theframes of the far-end data may be divided into sub-frames of sizeN_(S)=2 ms.

The receiver module 210 also receives frames of the microphone data fromthe microphone 110 b and divides them into sub-frames of length N_(S).However, it will be appreciated by a person having ordinary skill in theart that dividing the microphone data into sub-frames is not essentialto the implementation of examples described herein and the microphonedata can be directly used as-is, without dividing it into sub-frames.

The FFT module 212 is configured to convert time domain data intofrequency domain data using Fast Fourier Transformation of the timedomain data. The FFT module 212 also converts the frequency domain datato the time domain using Inverse Fast Fourier Transformation (IFFT) ofthe frequency domain data, when required.

The Adaptive Filtering Module 214 calculates the echo estimate datausing the far-end data. The adaptive filtering module 214 is realizedusing a Multi Delay Block Frequency Domain Acoustic Echo Cancellation(MDF) algorithm. In an MDF adaptive filtering algorithm, the adaptivefilter of length L is split into K equal adaptive sub-filters of lengthL/K. The adaptive filtering module 214 filters frequency domain far-enddata to compute the echo estimate data.

For example, the adaptive filter may be of length L=512, and may besplit into K=16 equal sub-filters of length N=32.

The 2-D Filter module 216 reduces or removes spectral leakage, whichoccurs in the Frequency Domain AEC system 200 due to a small size of theadaptive-sub filters. The spectral leakage arises in the MDF adaptivefiltering algorithm due to a small size (N=L/K) of the adaptivesub-filters. The length (N) of the adaptive sub-filters for the MDFadaptive filtering algorithm is smaller than the length (L) of theadaptive filter. Frequency domain conversion of sub-frames of thefar-end data for adaptive sub-filters of length N requires N-point FastFourier Transformation computation of the far-end data by the FFT module212. A smaller value of N for the N-point Fast Fourier Transformationcomputation results in more spectral leakage, which in turn results in aslower rate of convergence. Spectral leakage increases as the value of Ndecreases. Furthermore, the N-point Fast Fourier Transformation of thetime domain far-end data considers the far-end data in a plurality offrequency bins. Due to spectral leakage, some amount of data from eachof the plurality of frequency bins leaks into the neighboring frequencybins.

The 2-D filter module 216 outputs a modified power spectrum of thefrequency domain far-end data. The 2-D filter module 216 approximatesthe power level of each of the plurality of frequency bins (except forthe first and the last frequency bin) by estimating the power leakageacross one or more frequency bins on either side of each of theplurality of frequency bins. For the first frequency bin, the 2-D filtermodule 216 will estimate leakage across the one or more subsequentfrequency bins and for the last frequency bin, the 2-D filter module 216will estimate leakage across the one or more previous frequency bins.Based on the leakage estimation from the neighboring frequency bin(s), apower level of an intermediate frequency bin is approximated. Forexample, for each of the frequency bins except for the first and thelast frequency bin, the 2-D filter module 216 may estimate the powerleakage across two frequency bins i.e. one frequency bin on either sideof each of the plurality of frequency bins. For the first and lastfrequency bins, the power leakage is estimated across one frequency bini.e. one subsequent frequency bin for the first frequency bin and oneprevious frequency bin for the last frequency bin is estimated. For eachof the plurality of frequency bins, the number of frequency bins acrosswhich the power leakage is estimated may be further increased, therebyfurther reducing the spectral leakage.

The 2-D filter module 216 may be used to reduce or remove the spectralleakage, whenever time domain data is converted into frequency domaindata.

In accordance with the description given above, the 2-D filter module216 may be realized according to the following equations:

$\begin{matrix}{{P\left( {j,i} \right)} = \left\{ \begin{matrix}{{{0.75*{Z\left( {i,j} \right)}} + {0.25*{Z\left( {j,{i + 1}} \right)}}};\left\{ {i = 1} \right\}} \\{\left\lbrack {{\sum\limits_{p = {- 1}}^{p = 1}\;{0.25*{Z\left( {j,{i - p}} \right)}}} + {0.5*{Z\left( {j,i} \right)}}} \right\rbrack;} \\\left\{ {2 \leq i \leq {{segLen} - 1}} \right\} \\{{{0.25*{Z\left( {j,{i - 1}} \right)}} + {0.75*{Z\left( {j,i} \right)}}};\left\{ {i = {segLen}} \right\}}\end{matrix} \right.} & {{Equation}\text{-}1}\end{matrix}$Where,

-   -   P(j,i) is the approximated power level of i^(th) frequency bin        for the j^(th) block,    -   Z(j,i) is the initial power level of the i^(th) frequency bin,    -   i is the frequency bin index for the power level being        approximated,    -   segLen is the total number of frequency bins, and    -   p corresponds to the number of neighboring frequency bins        considered for approximating the power level of the i^(th)        frequency bin.

The equation provided to realize the 2-D filter module 216 (equation 1)is for illustration/exemplary purposes only and should not be consideredlimiting in any manner. The subtraction module 218 calculates errordata. Whenever microphone data is received and echo data has beenestimated, the subtraction module 218 computes the error data bysubtracting the received microphone data with the echo estimate data.

The divergence control module 220 limits the rate of rise of error data.It clips the error, whenever the error data rises suddenly due to falsedetection of near-end data e.g. due to detection of unwanted audio data(such as noise) as near-end data. When the error data, calculated by thesubtraction module 218 diverges beyond a predefined threshold value, itsignifies either the presence of near-end data or a change in the echopath. Also, due to false detection of near-end data, the error datashows divergence. The divergence control module 220 monitors thedivergence in the error data. When a sample of the error data showsdivergence with respect to a previous sample, the divergence controlmodule 220 monitors the divergence of one or more samples of the errordata following the sample of the error data. If one or more samples arealso diverged, it indicates that near-end data is present. If one ormore samples are not diverged, then the divergence in the error data isdue to false detection of the near-end data. The divergence controlmodule 220 clips the sample of error data when the divergence is due tofalse detection of the near-end data. When the near-end data is present,the divergence control module 220 reduces the step size to zero toprevent the adaptation of the adaptive sub-filters.

The gradient computation module 222 estimates a gradient from thedivergence controlled error data and the far-end data. The gradientcomputation module 222 multiplies the conjugate of the frequency domainfar-end data with frequency domain divergence controlled error data tocompute the gradient. Gradient estimation is explained below inconjunction with step 506 of FIG. 5.

The virtual double talk detector (VDTD) module 224 computes a step sizeestimate μ_(vdtd)(j,i) used for estimating a maximum allowed step sizefor adapting the adaptive sub-filters of the adaptive filtering module214. The VDTD module 224 uses correlations between the power spectraldensities (PSDs) of the far-end data, echo estimate data, microphonedata and the error data for computing the step size estimateμ_(vdtd)(j,i). The VDTD module 224 updates the step size estimateμ_(vdtd)(j,i) on the basis of real-time change in parameters such asecho path change or when operating in a “near-end alone region”, i.e.when operating in an instance where no far-end data (e.g. only near-enddata) is present in the microphone data. Updating the step size estimateμ_(vdtd)(j,i) on the basis of changing parameters allows the maximumallowed step size to be updated to match the real-time change inparameters. This in turn allows the adaptive sub-filters to be adaptedto the changing parameters.

The variable step size (VSS) module 226 computes a variable step sizeμ_(opt)(j,i) for adapting the adaptive sub-filters on the basis of echoleakage and the maximum allowed step size. When the error data is high(indicating a large error), the VSS module 226 increases the variablestep size μ_(opt)(j,i) in order to quickly converge the adaptivesub-filters. When the adaptive sub-filters are converged i.e. error datais reduced, the VSS module 226 decreases the variable step sizeμ_(opt)(j,i), resulting in good steady state error cancellation.

The far-end data repository 228 stores sub-frames of the far-end datawhich have been sent from the remote communication device 114 and whichare to be outputted from the speaker 110 a or an earpiece of thecommunication device 110.

The echo estimate data repository 230 stores the echo estimate datacalculated by the adaptive filtering module 214.

The error data repository 232 stores the filtered microphone data e.g.the error data calculated by the subtraction module 218.

FIG. 3 shows an exemplary architecture of an AEC system. Sub-frames offar-end data are stored in the far-end data repository 228. At block302, total length of the sub-frames of the far-end data in the far-enddata repository 228 is compared with the predefined length (SegLen). Inan instance where the total length of the sub-frames is less than thepredefined length (SegLen), sub-frames of the far-end data continue tobe stored in the far-end data repository 228.

In an instance where the total length of the sub-frames is greater thanor equal to the predefined length (SegLen), a first toggle switch 304 isswitched such that at block 306, the stored far-end data is converted tofrequency domain far-end data. The frequency domain far-end data is usedto compute echo estimate data by the adaptive sub-filters of theadaptive filtering module 214. At block 308, the echo estimate data isconverted to time domain echo estimate data. The time domain echoestimate data is stored in the echo estimate data repository 230. Whenmicrophone data is received, then at block 310, the length of the timedomain echo estimate data stored in the echo estimate data repository230 is compared with the length of the received microphone data in orderto determine whether there is “sufficient” echo estimate data in theecho estimate data repository 230 in order to use the echo estimate datafor calculating the error data, as described below. The “length of thereceived microphone data” in this instance is the length of microphonedata which is to be used to determine a corresponding length of errordata at a particular point in time. Therefore, the “length of thereceived microphone data” is not necessarily all of the microphone datathat has been stored since the system began receiving microphone data.

In an example, the length of microphone data and the length of echoestimate data which are used to determine the error data are the same.If the length of the echo estimate data stored in the second buffer isgreater than or equal to the length of the received microphone data(that is to be used to calculate the error data at a particular point intime) then “sufficient” echo estimate data is stored in the echoestimate data repository 230. In an example, for the echo estimate datastored in the echo estimate data repository 230 to be considered“sufficient”, the length of the echo estimate data stored in the echoestimate data repository 230 is greater than or equal to the length ofthe received microphone data. If there is enough echo estimate data inthe echo estimate data repository 230 in order to calculate the errordata by subtracting echo estimate data from microphone data, then thisis how the error data is calculated. The echo estimate data repository230 is also referred to herein as the “second buffer”. In an instancewhere the length of the stored time domain echo estimate data is greaterthan or equal to the length of the received microphone data (i.e. thereis sufficient echo estimate data in the second buffer), a second toggleswitch 312 a is switched such that the subtraction module 218 calculateserror data by subtracting, from the received microphone data,corresponding time domain echo estimate data from the echo estimate datarepository 230.

However, in an instance, where the length of the stored time domain echoestimate data is less than the length of the received microphone data(i.e. there is not sufficient echo estimate data stored in the secondbuffer, e.g. when the system is initiated and before enough echoestimate data has been calculated and stored in the second buffer foruse in calculating the error data), a third toggle switch 312 b isswitched such that the subtraction module 218 is bypassed. The receivedmicrophone data may be attenuated at block 314. The attenuatedmicrophone data is sent for further processing in the localcommunication device 110. Furthermore, in this case (i.e. the“insufficient” case), echo estimate data that is present in the echoestimate data repository 230, which corresponds to the microphone datathat is used to calculate the error data, is removed from the echoestimate data repository 230. This echo estimate data can be removedfrom the echo estimate data repository 230 because it is not going to beused to calculate error data. In the example shown in FIG. 3, only oneof the toggle switches 312 a and 312 b (not both) is switched on at anygiven time. The error data outputted from either the subtractor 218 orthe attenuator 314 (in accordance with the result of the decision instep 310) is used as the error data and outputted for further processingin the local communication device 110.

The error data calculated by the subtraction module 218 is stored in theerror data repository 232. However, if the error data has beencalculated by bypassing the subtractor 218 (i.e. when the length of thestored time domain echo estimate data is less than the length of thereceived microphone data) then the error data is not stored in the errordata repository 232. At block 316, the length of the stored error datais compared with the predefined length (SegLen). In an instance wherethe length of stored error data is less than the predefined length(SegLen), the error data is further stored in the error data repository232.

In an instance where the length of stored error data is greater than orequal to the predefined length (SegLen), a fourth toggle switch 318 isswitched such that at block 320, the stored error data is converted tofrequency domain error data. At block 322, the frequency domain errordata is used to update the coefficients of the adaptive sub-filters inthe adaptive filtering module 214.

FIGS. 4A-4B are a flow diagram illustrating a method for error datacalculation. At step 402, one or more frames of the far-end data arereceived by the receiver module 210 from the remote communication device114 e.g. over the network 106. The receiver module 210 divides theframes of the far-end data into sub-frames of size N_(S). For example,the size N_(S) of the sub-frames of the far-end data may be 2 ms.

At step 404, the sub-frames of the far-end data are stored in a firstbuffer (shown as the “far-end data repository 228” in FIG. 3). Thesub-frames of the far-end data are stored until the total length of thesub-frames of the far-end data exceeds a predefined length (indicated as“SegLen” in FIG. 3). For example, the predefined length may be 4 ms. Thepredefined length may be equal to the adaptive sub-filter length. Itwill be appreciated by a person having ordinary skill in the art thatthe predefined length may be set to any suitable length withoutdeparting from the scope of the examples described herein.

At step 406, the total length of the sub-frames in the far-end datarepository 228 is compared with the predefined length (SegLen). In aninstance where the total length of the sub-frames of the far-end datadoes not exceed the predefined length (SegLen), the method proceeds fromstep 406 to step 402. In an instance where the total length of thesub-frames of the far-end data exceeds the predefined length (SegLen),the method proceeds to step 408. At step 408, the adaptive filteringmodule 214 computes the echo estimate data from the far-end data storedin the far-end data repository 228. The FFT module 212 converts thesub-frames of the far-end data stored in the far-end data repository 228into frequency domain far-end data. The frequency domain far-end data isthen filtered using the adaptive sub-filters (indicated as “adaptivefiltering module 214” in FIG. 3) in the adaptive filtering module 214.The output of the adaptive filtering module 214 is a frequency domainecho estimate data. The FFT module 212 then applies Inverse Fast FourierTransformation to convert the frequency domain echo estimate data totime domain echo estimate data.

Power spectrum of the frequency domain far-end data may be fed to the2-D filter module 216 to compensate for spectral leakage beforeadaptation of the adaptive filtering module 214.

At step 410, the time domain echo estimate data is stored in the secondbuffer (indicated as “Echo estimate data repository 230” in FIG. 3).

Thus, depending upon the availability of the far-end data, the far-enddata is processed for calculating the echo estimate data and the timedomain echo estimate data is stored in the echo estimate data repository230. The far-end data may occur as a continuous stream of data.Alternatively, the far-end data may occur in bursts at uneven timeintervals.

At step 412, the microphone data from the microphone 110 b of the localcommunication device 110 is received by the receiver module 210. In anembodiment, whenever frames of the microphone data are present, thereceiver module 210 divides the frames of the microphone data intosub-frames of size N_(S). For example, the size N_(S) of the sub-framesof the microphone data may be 2 ms. However, it will be appreciated by aperson having ordinary skill in the art that dividing the microphonedata in to sub-frames is not essential to the implementation of theexamples described herein and the microphone data can be directly usedas-is, without dividing it into sub-frames.

At step 414, the length of the echo estimate data stored in the echoestimate data repository 230 is compared with the length of the receivedmicrophone data. In an instance where the length of the echo estimatedata stored in the echo estimate data repository 230 is greater than orequal to the length of the received microphone data, the method proceedsto step 416. At step 416, the second toggle switch 312 a shown in FIG. 3is switched such that error data is calculated on the basis of thereceived microphone data and the echo estimate data stored in the echoestimate data repository 230. The subtraction module 218 calculates theerror data by subtracting, from the received microphone data,corresponding echo estimate data from the echo estimate data repository230.

At step 418, the error data calculated by the subtraction module 218 isstored in the error data repository 232 (indicated as error datarepository 232 in FIG. 3). The method passes from step 418 to step 424which is described below.

In an instance where the length of the echo estimate data stored in theecho estimate data repository 230 is not greater than or equal to thelength of the received microphone data, the method proceeds from step414 to step 420. At step 420, the echo cancellation parametersincluding, but not limited to, variable step size or maximum allowedstep size are reset for re-convergence of the adaptive sub-filters. Inthis case, the third toggle switch 312 b shown in FIG. 3 is switchedsuch that the echo estimate data stored in the echo estimate datarepository 230 is not subtracted from the received microphone data tocalculate the error data. Instead, the microphone data is used as theerror data. Some attenuation may be applied to the microphone databefore it is used as the error data, but the subtraction module 218 isbypassed by setting the third toggle switch 312 b shown in FIG. 3accordingly. In this way, when there is not enough echo estimate data toperform the subtraction, the microphone data is used as the error data,thereby avoiding a delay caused by waiting for the far-end data in thefar-end buffer to reach the predefined length (SegLen). Furthermore, asdescribed above, in this case the echo estimate data that corresponds tothe microphone data used to calculate the error data is removed from theecho estimate data repository 230. In step 422 the error data is sentfor further processing in the local communication device 110. At step424, the length of the error data stored in the error data repository232 at step 418 is compared with the predefined length (SegLen). Thepredefined length is same as the length of each of the adaptivesub-filters i.e. N=L/K. In an instance where the length of the errordata in the error data repository 232 is greater than or equal to thepredefined length, the method proceeds to step 426, and the fourthtoggle 318 shown in FIG. 3 is switched on. At step 426, the stored errordata is processed further for adapting the adaptive sub-filters (in theco-efficient adaptation processing block 322 shown in FIG. 3).

The method proceeds from step 426 to step 422. As described above, instep 422 the error data (which in this case has been calculated in step416 by subtracting the echo estimate data from the microphone data) issent for further processing in the local communication device 110.

In an instance where the length of the error data in the error datarepository 232 is not greater than or equal to the predefined length themethod proceeds to from step 424 straight to step 422, and step 426 isnot performed, i.e. the error data is not processed to adapt theadaptive sub-filters.

Thus, when the microphone data is present, the error data is calculated.It may be considered that the error data is calculated immediately. Thisis achieved by calculating the error data responsive to the reception ofthe microphone data. Subsequent to the far-end data in the far-end datarepository 228 exceeding the predefined length (SegLen), the echoestimate data is calculated by the adaptive filtering module 214. Theerror data can be calculated responsive to receiving the microphone databy subtracting, from the microphone data, corresponding echo estimatedata stored in the echo estimate data repository 230. The calculation ofthe error data does not have to wait for the computation of a length(equal to the length of the microphone data) of the corresponding echoestimate data from the far-end data due to independent processing of thefar-end data and the microphone data. Therefore, the delay incalculating the error data (i.e. the algorithmic delay) is significantlyreduced due to the independent processing of the far-end data and themicrophone data. Furthermore, in some examples, when sufficient lengthof the echo estimate data is not yet present in the echo estimate datarepository 230, the error data is calculated based on the microphonedata (e.g. as attenuated by block 314) and not based on the echoestimate data. In that case, echo cancellation parameters may be resetand the received microphone data may be sent for further processing inthe local communication device, thereby avoiding a delay caused bywaiting for the occurrence of far-end data to calculate the sufficientecho estimate data for calculating the error data. For example, thedelay in calculating the error data may be reduced to zero orsubstantially to zero (e.g. to a non-zero value, such as a few nanoseconds, which may be treated by the AEC as being equivalent to zero).

FIG. 5 is a flow diagram 500 illustrating a method for updating adaptivesub-filter coefficients, used by the adaptive filtering module 214.

At step 502, divergence of the error data is controlled by thedivergence control module 220. Whenever the error data exceeds apredefined threshold value due to false detection of the near-end data,the divergence control module 220 clips the error data. In anembodiment, the divergence control module 220 is realized through thefollowing equations for controlling the divergence of the error data.

$\begin{matrix}{{{\ell(n)}} = {{{sign}\left( {e(n)} \right)}{\min\left( {{\gamma_{0}{\ell_{p}(n)}},{{\ell(n)}}} \right)}}} & {{Equation}\text{-}2} \\{{\ell_{p}\left( {n + 1} \right)} = \left\{ \begin{matrix}{{\gamma_{2}{\ell_{p}(n)}} + {\gamma_{1}{{\ell(n)}}}} & {{if}\left( {{\gamma_{0}{\ell_{p}(n)}} \leq {{\ell(n)}}} \right.} \\{\gamma_{3}{\ell_{p}(n)}} & {elsewhere}\end{matrix} \right.} & {{Equation}\text{-}3}\end{matrix}$Where,

-   -   e(n) is the time domain error signal,    -   n is the discrete sampling index    -   l(n) is the absolute error,    -   l_(p)(n) is the absolute past error and    -   γ₃, γ₂, γ₁ and γ₀ are positive constants and in an example their        values are set to 1.0003, 0.9950, 0.000732 and 0.0916        respectively.

The initial value of l_(p) (0) is set to a large value, so that thedivergence control does not clip the error during initial convergence.Equation-2 is the limiting equation and equation-3 is for updatingsmoothed absolute past error.

It will be appreciated by a person having ordinary skill in the art thatequations 2 and 3 provided to realize the divergence control module 220are for illustration/exemplary purposes and should not be consideredlimiting in any manner.

At step 504, an inverse power spectrum P(j,i)⁻¹ for the i^(th) frequencybin and j^(th) block of the far-end data is computed. The sub-frames ofthe far-end data are converted to the frequency domain by the FFT module212. The frequency domain sub-frames of the far-end data are then usedfor generating the power spectrum P^(k) (j,i) of the far-end data.

In an embodiment, following equation represents the power spectrum forsamples of the j^(th) block of far-end data for all adaptivesub-filters.

$\begin{matrix}{{P^{k}\left( {j,i} \right)} = \left\{ \begin{matrix}{{P^{k + 1}\left( {{j - 1},i} \right)};} & {\forall\left( {\left( {k,{k \neq K}} \right),i} \right)} \\{\left\lbrack {\left( {X^{K}\left( {j,i} \right)} \right)^{*}*{X^{K}\left( {j,i} \right)}} \right\rbrack;} & {k = K}\end{matrix} \right.} & {{Equation}\text{-}4}\end{matrix}$Where,

-   -   P^(k) GO represents the power spectrum of the k^(th) sub-filter        for samples of the j^(th) block of far-end data,    -   K is the number of adaptive sub-filters,    -   i is the frequency bin index, and    -   X^(K)(j,i) is the input to the K^(th) sub filter for the j^(th)        block in frequency bin i.

It will be appreciated by a person having ordinary skill in the art thatequation 4 provided to represent the power spectrum for samples of thej^(th) block of far-end data for all adaptive sub-filters is forillustration/exemplary purposes and should not be considered limiting inany manner.

The power spectrum of the far-end data is then filtered by the 2-Dfilter module 216 to compensate for the spectral leakage which asdescribed above is due to the computation of the N point Fast FourierTransformation of the far-end data. The 2-D filter module 216 hasalready been explained in detail in conjunction with the explanation forFIG. 2. Referring again to FIG. 4, inverse power spectrum P(j,i)⁻¹ forthe i^(th) frequency bin index is then computed from the filtered powerspectrum of the far-end data.

At step 506, a gradient Φ^(k)(j,i), for the k^(th) sub filter for thej^(th) block and frequency bin i, is computed from the far-end data andthe error data by the gradient computation module 222. The divergencecontrolled error data and the sub-frames of the far-end data areconverted to frequency domain by the FFT module 212. The conjugate ofthe frequency domain far-end data is then computed. The conjugate of thefrequency domain far-end data is multiplied with the frequency domainerror data to compute the gradient Φ^(k)(j,i).

For better convergence, the gradient is converted to time domain and thelast N samples of the time domain gradient are updated with zeros. Theupdated time domain gradient is then converted to frequency domaingradient Φ^(k)(j,i).

At step 508, a step size estimate μ_(vdtd)(j,i), for each of the ifrequency bins is updated by the VDTD module 224. Smoothed powerspectral densities (PSDs) of the far-end data, echo estimate data,microphone data and the error data are computed from the frequencydomain far-end data, frequency domain echo estimate data, frequencydomain microphone data and frequency domain error data respectively. Inan example, the following equation can be used for computing thesmoothed PSD of the far-end data.P _(x)(j,i)=[X ^(K)(j,i)*X* ^(K)(j,i)−P _(x)(j−1,i)]λ+P_(x)(j−1,i)  Equation-5Where,

-   -   P_(x)(j,i) is the smoothed power spectrum of the far-end data,    -   X^(K)(j,i) represents the K^(th) sub filter's frequency domain        far-end data,    -   X*^(K)(j,i) represents the conjugate of K^(th) sub filter's        frequency domain far-end data.    -   j and (j−1) refers to the j^(th) and (j−1)^(th) block of the        far-end data,    -   i is the frequency bin index, and    -   λ is a smoothening parameter, which may, for example, be set to        0.125.

Corresponding equations can be used for computing the smoothed PSDs ofthe echo estimate data, microphone data and error data.

It will be appreciated by a person having ordinary skill in the art thatequations provided to compute the smoothed PSDs of the far-end data,echo estimate data, microphone data and the error data is simply forillustration/exemplary purposes and should not be considered limiting inany manner.

A first correlation R_(ey) between the PSDs of the echo estimate dataand the error data, a second correlation R_(xe) between the PSDs of theerror data and the far-end data, a third correlation R_(ed) between thePSDs of microphone data and the error data and an auto correlationR_(yy) for the PSD of echo estimate data are computed. A residual echofactor ξ(j,i) is estimated for the i^(th) frequency bin from the powerspectrum of the echo estimate data, the error data and the microphonedata. In an example, the following equation can be used for estimatingthe residual echo factor ξ(j,i).

$\begin{matrix}{{{\xi\left( {j,i} \right)} = \frac{{{P_{d}\left( {j,i} \right)}*{P_{e}\left( {j,i} \right)}}}{{P_{y}\left( {j,i} \right)}❘^{2}}};} & {{Equation}\text{-}6}\end{matrix}$Where,

-   -   P_(y)(j,i) is the smoothened power spectrum of the echo-estimate        data,    -   P_(e)(j,i) is the smoothened power spectrum of the error data,        and    -   P_(d)(j,i) is the smoothened power spectrum of the microphone        data.

It will be appreciated by a person having ordinary skill in the art thatequation 6 provided to estimate the residual echo factor ξ(j,i) is forillustration/exemplary purposes and should not be considered limiting inany manner.

A leakage factor η(j) for each of the frequency bins is computed on thebasis of the first correlation, the second correlation, the thirdcorrelation and the fourth auto correlation. The leakage factor is usedto determine a measure of the extent to which the far-end data ispresent in the error data. In an example, the following equation can beused for computing the leakage factor.

$\begin{matrix}{{\eta(j)} = \frac{{\sum\limits_{\forall i}^{\;}\;{R_{ey}\left( {j,i} \right)}} + {\sum\limits_{\forall i}^{\;}\;{R_{xe}\left( {j,i} \right)}}}{{\sum\limits_{\forall i}^{\;}\;{R_{ed}\left( {j,i} \right)}} + {\sum\limits_{\forall i}^{\;}\;{R_{yy}\left( {j,i} \right)}}}} & {{Equation}\text{-}7}\end{matrix}$Where,

-   -   η(j) is the leakage factor,    -   R_(ey)(j,i) is the first correlation between the error data and        the echo estimate data,    -   R_(xe)(j,i) is the second correlation between the far-end data        and the error data,    -   R_(ed)(j,i) is the third correlation between the error data and        the microphone data, and    -   R_(yy)(j,i) is the auto correlation for the echo estimate data,        and    -   i is the frequency bin index.

It will be appreciated by a person having ordinary skill in the art thatequation 7 provided to compute the leakage factor is forillustration/exemplary purposes and should not be considered limiting inany manner.

In an embodiment, the correlations R_(ey)(j,i) and R_(xe)(j,i) in thenumerator of the above equation can be estimated using the followingequations:

$\begin{matrix}{\mspace{20mu}{{{R_{ey}^{1}\left( {j,i} \right)} = {{P_{e}\left( {j,i} \right)}*{P_{y}\left( {j,i} \right)}}};}} & {{Equation}\text{-}8} \\{\mspace{20mu}{{{\Delta\;{R_{ey}\left( {j,i} \right)}} = {{R_{ey}^{1}\left( {j,i} \right)} - {R_{ey}\left( {{j - 1},i} \right)}}};}} & \; \\{{R_{ey}\left( {i,j} \right)} = \left\{ \begin{matrix}{{{R_{ey}\left( {{j - 1},i} \right)} + {\Delta\;{R_{ey}\left( {j,i} \right)}*\alpha_{1}}};{{\Delta\;{R_{ey}\left( {j,i} \right)}} > 0}} \\{{{R_{ey}\left( {{j - 1},i} \right)} + {\Delta\;{R_{ey}\left( {j,i} \right)}*\alpha_{2}}};{otherwise}}\end{matrix} \right.} & \; \\{\mspace{20mu}{{{R_{xe}^{1}\left( {j,i} \right)} = {{P_{x}\left( {j,i} \right)}*{P_{e}\left( {j,i} \right)}}};}} & {{Equation}\text{-}9} \\{\mspace{20mu}{{{\Delta\;{R_{xe}\left( {j,i} \right)}} = {{R_{xe}^{1}\left( {j,i} \right)} - {R_{xe}\left( {{j - 1},i} \right)}}};}} & \; \\{{R_{ex}\left( {j,i} \right)} = \left\{ \begin{matrix}{{{R_{xe}\left( {{j - 1},i} \right)} + {\Delta\;{R_{xe}\left( {j,i} \right)}*\alpha_{1}}};{{\Delta\;{R_{xe}\left( {j,i} \right)}} > 0}} \\{{{R_{ex}\left( {{j - 1},i} \right)} + {\Delta\;{R_{ex}\left( {j,i} \right)}*\alpha_{2}}};{otherwise}}\end{matrix} \right.} & \;\end{matrix}$

α₁ and α₂ are numbers which can be set. For example, the estimatedcorrelations of the numerator of the leakage factor η(j) are shaped forsharp rise and slow decay using parameters α₁=0.4 and α₂=0.05, to updatethe step size estimate μ_(vdtd)(j,i) accordingly.

It will be appreciated by a person having ordinary skill in the art thatequations 8 and 9 provided to compute the correlations R_(ey)(j,i) andR_(xe)(j,i) are for illustration/exemplary purposes and should not beconsidered limiting in any manner.

In an embodiment, the correlation R_(ed)(j,i) and the auto correlationR_(yy)(j,i) in the denominator of the above equation can be estimatedusing the following equations:

$\begin{matrix}{\mspace{20mu}{{{R_{ed}^{1}\left( {j,i} \right)} = {{P_{e}\left( {j,i} \right)}*{P_{d}\left( {j,i} \right)}}};}} & {{Equation}\text{-}10} \\{\mspace{20mu}{{{\Delta\;{R_{ed}\left( {j,i} \right)}} = {{R_{ed}^{1}\left( {j,i} \right)} - {R_{ed}\left( {{j - 1},i} \right)}}};}} & \; \\{{R_{ed}\left( {i,j} \right)} = \left\{ \begin{matrix}{{{R_{ed}\left( {{j - 1},i} \right)} + {\Delta\;{R_{ed}\left( {j,i} \right)}*\beta_{1}}};{{\Delta\;{R_{ed}\left( {j,i} \right)}} > 0}} \\{{{R_{ed}\left( {{j - 1},i} \right)} + {\Delta\;{R_{ed}\left( {j,i} \right)}*\beta_{2}}};{otherwise}}\end{matrix} \right.} & \; \\{\mspace{20mu}{{{R_{yy}^{1}\left( {j,i} \right)} = {{P_{y}\left( {j,i} \right)}*{P_{y}\left( {j,i} \right)}}};}} & {{Equation}\text{-}11} \\{\mspace{20mu}{{{\Delta\;{R_{yy}\left( {j,i} \right)}} = {{R_{yy}^{1}\left( {j,i} \right)} - {R_{yy}\left( {{j - 1},i} \right)}}};}} & \; \\{{R_{yy}\left( {j,i} \right)} = \left\{ \begin{matrix}{{{R_{yy}\left( {{j - 1},i} \right)} + {\Delta\;{R_{yy}\left( {j,i} \right)}*\beta_{1}}};{{\Delta\;{R_{yy}\left( {j,i} \right)}} > 0}} \\{{{R_{yy}\left( {{j - 1},i} \right)} + {\Delta\;{R_{yy}\left( {j,i} \right)}*\beta_{2}}};{otherwise}}\end{matrix} \right.} & \;\end{matrix}$

δ₁ and δ₂ are numbers which can be set. For example, the estimatedcorrelation and auto correlation components in the denominator ofleakage factor η(j) are shaped for slow rise and sharp decay rate usingparameters ρ₁=0.05 and ρ₂=0.3 to update the step size estimateμ_(vdtd)(j,i) accordingly.

It will be appreciated by a person having ordinary skill in the art thatequations 10 and 11 provided to compute the correlation R_(ed)(j,i) andthe auto correlation R_(yy)(j,i) are for illustration/exemplary purposesand should not be considered limiting in any manner.

The product of leakage factor η(j) and estimated residual echo parameterξ(j,i) is compared with a maximum step size, μ_(max)(j) for computingthe maximum allowable step size, μ_(vdtd)(j,i).

$\begin{matrix}{{\mu_{vdtd}\left( {j,i} \right)} = \left\{ \begin{matrix}{{{\eta(j)}*{\xi\left( {j,i} \right)}};} & {{if}\left( {{{\eta(j)}*{\xi\left( {j,i} \right)}} < {\mu_{\max}(i)}} \right)} \\{{\mu_{\max}(i)};} & {otherwise}\end{matrix} \right.} & {{Equation}\text{-}12}\end{matrix}$

It will be appreciated by a person having ordinary skill in the art thatequation 12 provided to update the step size estimate μ_(vdtd)(j,i) isfor illustration/exemplary purposes and should not be consideredlimiting in any manner.

The significance of the above equations (6, 7 and 12) for step sizeestimation μ_(vdtd)(j,i) can be understood by considering the followingecho cancellation scenarios:

1. Startup Phase of Echo Cancellation:

-   -   a) Single Talk: In this case, the far-end data and the error        data are highly correlated i.e. R_(xe) is high showing large        echo leakage and, R_(ey) and R_(yy) are very small as the echo        estimate data is zero. Also ξ(j,i) is large as the echo estimate        data is low, resulting in high step size estimate μ_(vdtd)(j,i).    -   b) Near End Alone: In this case, R_(xe) and R_(ey) are zero as        there will be no correlation in the near end alone region. The        leakage factor η(j) is zero, resulting in no adaptation of the        adaptive sub-filters.    -   c) Double Talk: Since the echo estimate data is very low, R_(ey)        and R_(yy) are very low. The leakage factor η(j) is a function        of R_(xe) in the numerator and R_(ed) in the denominator.        2. Convergence Phase of Echo Cancellation:    -   a. Single Talk: In this phase, the far-end data, the near end        data, the echo estimate data and the error data are correlated        with each other. Auto correlation R_(yy) of the echo estimate        data, in the denominator is the weighting factor to the leakage        factor η(j).    -   b. Near End Alone: In this case, the numerator terms R_(xe) and        R_(ey) are zero as there will be no correlation of the far-end        data, the echo estimate data with the error data in near end        alone region. The leakage factor η(j) is zero, resulting in no        adaptation of the adaptive sub-filters.    -   c. Double Talk: In this scenario, the leakage factor η(j)        depends on the near end to echo ratio and is low.        3. Steady State Phase of Echo Cancellation:    -   a) Single Talk: In this case the far-end data and the echo        estimate data are uncorrelated with the error data as the error        data is very small, thereby reducing the numerator of the        leakage factor η(j) to a very small value, resulting in a very        small step size estimate μ_(vdtd)(j,i).    -   b) Near end Alone: In this case, numerator terms R_(xe) and        R_(ey) are zero as there will be no correlation of the far-end        data and the echo estimate data with the error data. The leakage        factor η(j) is zero, resulting in no adaptation of the adaptive        sub-filters.    -   c) Double Talk: In this scenario, correlation of the error data,        the echo estimate data and the far-end data is low. In the        denominator of the leakage factor η(j), R_(yy) is small and        correlation of the near end data and the error data, R_(ed) is        high, depending on near end to echo ratio.

The step size estimate μ_(vdtd)(j,i) is used to update the maximumallowed step size for adapting the adaptive sub-filters. In echoregions, value of μ_(vdtd)(j,i) varies with respect to the aboveequation. When only the near-end data is present μ_(vdtd)(j,i) will bezero as filter adaptation is not required.

At step 510, the variable step size μ_(vdtd)(j,i) for adapting theadaptive sub-filters is computed by the VSS module 226. The step sizefor adapting the adaptive sub-filters is varied: on the basis of along-term average of the power spectrum of microphone data, which isdenoted P_(ld)(j,i), and a long term average of the power spectrum oferror data, which is denoted P_(le)(j,i). For example, the followingequations may be used to compute long-term averages of the powerspectrum of error data and the microphone data:P _(le) =P _(le)(j,i−1)+γ₄(|E(j,i)−P _(le)(j,i−1))P _(ld)(j,i)=P _(ld)(j,i−1)+γ₄(|j,i)|−P _(ld)(j,i−1))  Equation-13

-   -   where, E(j,i) is frequency domain representation of error data        for j^(th) frame and i^(th) frequency bin index,    -   D(j,i) is frequency domain representation of microphone data for        j^(th) frame and i^(th) frequency bin index, and    -   γ₄ is a constant equal to (N+1)⁻¹, where N is the number of        samples that are considered in the long term averages.

It will be appreciated by a person having ordinary skill in the art thatequation 13 provided to compute the long-term averages of the error dataand the microphone data is for illustration/exemplary purposes andshould not be considered limiting in any manner.

An echo leakage parameter Δ(j,i) for the i^(th) frequency bin iscomputed on the basis of long term averages of the microphone data andthe error data. In an example, the following equation is used to computethe echo leakage parameter Δ(j,i):Δ(j,i)=(P _(le)(j,i)/P _(ld)(j,i))  Equation-14

It will be appreciated by a person having ordinary skill in the art thatequation 14 provided to compute the echo leakage parameter Δ(j,i) is forillustration/exemplary purposes and should not be considered limiting inany manner. The echo leakage parameter Δ(j,i) corresponds to a measureof the extent to which the far-end data is present in the error data.

The variable step size μ_(opt)(j) for the k^(th) adaptive sub-filter isestimated on the basis of the maximum allowed step size μ_(max)(i)allowed for the current sample of echo data, and the echo leakageparameter Δ(j,i). The maximum allowed step size μ_(max)(i) depends on alearning speedup counter entr(i). The learning speed up counter entr(i)is used to avoid high step size applied due to high value of leakageparameter Δ(j,i). In an embodiment, the learning speedup counter isincremented by the following equation.

$\begin{matrix}{{{cntr}\left( {i + 1} \right)} = \left\{ \begin{matrix}{0;} & {{if}\left( {{\eta(j)} < \eta_{\min}} \right)} \\{\left\lbrack {{{cntr}(i)} + 1} \right\rbrack;} & {otherwise}\end{matrix} \right.} & {{Equation}\text{-}15}\end{matrix}$

Where η_(min) is a minimum leakage factor, may be set, for example, tobe 0.0002.

It will be appreciated by a person having ordinary skill in the art thatequation 15 provided to increment the learning speedup counter is forillustration/exemplary purposes and should not be considered limiting inany manner.

In the above disclosed embodiment, the variable step size μ_(opt)(i) isestimated for the i^(th) frequency bin index of the k^(th) adaptivesub-filter. In similar ways, the variable step size is estimated for thefrequency bin indices of all the adaptive sub-filters.

In an embodiment, the following equation is used to compute the maximumallowed step size μ_(max) (i) allowed for the current sample of echodata and echo leakage parameter Δ(j,i):

$\begin{matrix}{{\mu_{\max}(i)} = \left\{ \begin{matrix}{\frac{\mu_{vdtd}\left( {j,i} \right)}{4};} & {{if}\left( {{{cntr}(i)} < 5} \right)} \\{{\mu_{vdtd}\left( {j,i} \right)};} & {otherwise}\end{matrix} \right.} & {{Equation}\text{-}16}\end{matrix}$

The maximum allowed step size μ_(max)(i) corresponds to a maximum valuebeyond which the step size cannot be varied. It will be appreciated by aperson having ordinary skill in the art that equation 16 provided tocompute the maximum allowed step size μ_(max)(i) allowed for the currentfrequency bin of echo data and echo leakage parameter Δ(j,i) is forillustration/exemplary purposes and should not be considered limiting inany manner.

To reduce the mis-adjustment or to increase the steady state echocancellation, the step size is limited by the echo leakage parameterΔ(j,i). Therefore, a very small step size is applied when the adaptivefilter has converged. In an example, the following equation is used tocompute the variable step size μ_(opt)(j)

$\begin{matrix}{{\mu_{opt}\left( {j,i} \right)}{\min\left( {{\mu_{\max}(i)},\frac{\Delta\left( {j,i} \right)}{1.25\; N}} \right)}} & {{Equation}\text{-}17}\end{matrix}$

It will be appreciated by a person having ordinary skill in the art thatequation 17 provided to compute the variable step size μ_(opt)(j) is forillustration/exemplary purposes and should not be considered limiting inany manner.

At step 512, a weight correction factor Δ^(k)(j,i) is estimated on thebasis of the inverse power spectrum P(j,i)⁻¹, the gradient Φ^(k)(j,i)and the variable step size μ_(opt)(i). In an embodiment, the followingequation is used to estimate the weight correction factor

$\begin{matrix}{{{{\Delta^{k}\left( {j,i} \right)}\text{:}\mspace{14mu}{\Delta^{k}\left( {j,i} \right)}} = \left( {\left( \frac{2\; K\;\mu}{Z\left( {j,i} \right)} \right){\Phi^{k}\left( {j,i} \right)}} \right)},{\forall\left( {k,i} \right)}} & {{Equation}\text{-}18}\end{matrix}$

It will be appreciated by a person having ordinary skill in the art thatequation 18 provided to estimate the weight correction factor Δ^(k)(j,i)is for illustration/exemplary purposes and should not be consideredlimiting in any manner.

At step 514, the coefficients of the adaptive sub-filters are updated onthe basis of the weight correction factor Δ^(k)(j,i). In an example, thefollowing equation represents the updating of the adaptive sub-filtercoefficients:W ^(k)(j+1,i)=W ^(k)(j,i)+Δ^(k)(j,i),∀(k,i)  Equation-19

It will be appreciated by a person having ordinary skill in the art thatequation 19 provided to update the adaptive sub-filter coefficients isfor illustration/exemplary purposes and should not be consideredlimiting in any manner.

The current coefficients of the adaptive sub-filters are replaced withthe coefficients calculated at step 514. Thus, the adaptive sub-filtersare adapted to match the changing parameters resulting in effectiveacoustic echo cancellation. When frames of the microphone data arereceived, the error data is calculated and, when the error data has beencalculated based on the echo estimate data then the coefficientscorresponding to each of the plurality of frequency bins of the errordata are updated to adapt the adaptive sub-filters to match the changingparameters. Therefore, the step size estimate is varied based on theestimated echo leakage and a maximum allowed step size.

The above disclosed embodiments are described with reference tofrequency domain acoustic echo cancellation. However, the disclosedmethods and systems, as illustrated in the ongoing description can alsobe implemented in the time domain. In an example, for time domainacoustic echo cancellation, the variable step size is computed for eachof the samples of the error data. Based on the variable step size,gradient and inverse power spectrum of the far-end data, thecoefficients corresponding to each of the samples of the microphone dataare updated.

Further, in an embodiment, the 2-D filter module 216 is not used in thetime domain acoustic echo cancellation.

Further in an embodiment, for time domain acoustic echo cancellation,the 2-D filter module 216 can be used to compensate for the spectralleakage due to a small size of the adaptive sub-filters.

The disclosed methods and systems, as illustrated in the ongoingdescription or any of its components, may be embodied in the form of acomputer system. Typical examples of a computer system include ageneral-purpose computer, a programmed microprocessor, amicrocontroller, a peripheral integrated circuit element, and otherdevices, or arrangements of devices that are capable of implementing thesteps that constitute the method of the disclosure.

The computer system may execute a set of instructions (which are e.g.programmable or computer-readable instructions) that are stored in oneor more storage elements, in order to process input data. The storageelements may also hold data or other information, as desired. Thestorage elements may be in the form of an information source or aphysical memory element present in the processing machine.

The programmable or computer-readable instructions may include variouscommands that instruct the processing machine to perform specific taskssuch as steps that constitute the method of the disclosure. The methodand systems described herein may be implemented using software modulesor hardware modules or a combination thereof. The disclosure isindependent of the programming language and the operating system used ina computer implementing the method. The instructions for the disclosurecan be written in any suitable programming language including, but notlimited to, ‘C’, ‘C++’, ‘Visual C++’, and ‘Visual Basic’. Further, thesoftware may be in the form of a collection of separate programs, aprogram module containing a larger program or a portion of a programmodule, as discussed in the ongoing description. The software may alsoinclude modular programming in the form of object-oriented programming.The processing of input data by the processing machine may be inresponse to user commands, results of previous processing, or a requestmade by another processing machine.

The programmable instructions can be stored and transmitted on acomputer-readable medium. The disclosure can also be embodied in acomputer program product comprising a computer-readable medium, or withany product capable of implementing the above methods and systems, orthe numerous possible variations thereof. The computer readable mediummay be configured as a computer readable storage medium and thus is nota signal bearing medium.

The methods and systems as described herein, allow for reducing thealgorithmic delay i.e. the delay in calculating the error data. Due toindependent processing of the far-end data and the microphone data, themicrophone data is processed immediately without waiting for equalamount of echo estimate data.

Furthermore, the methods and systems described herein include loadbalancing of the processor. The far-end data and the microphone data areprocessed based on the data availability. Whenever the far-end dataoccurs, the echo estimate data is calculated and stored in the echoestimate data repository 230. Whenever a length of microphone dataoccurs, the processor is not required to immediately process the equallength of far-end data to calculate the error estimate data. Hence, itprovides load balancing even during a bunch of multiple microphone dataframes or far-end data frames.

Furthermore, the methods and systems described herein include increasedconvergence speed and higher steady state error cancellation. The stepsize for updating the coefficients is varied based on the changingparameters including, but not limited to, echo path change or falsedetection of near end. The variable step size is increased when theerror data is high, ensuring quick convergence of the adaptivesub-filters, and the variable step size is decreased when the adaptivesub-filters are converged, ensuring increase in steady state errorcancellation.

Various embodiments of the methods and systems for acoustic echocancellation have been disclosed. However, it should be apparent tothose skilled in the art that many more modifications, besides thosedescribed, are possible without departing from the inventive conceptsherein. The embodiments, therefore, are not to be restricted, except inthe spirit of the disclosure. Moreover, in interpreting the disclosure,all terms should be understood in the broadest possible mannerconsistent with the context. In particular, the terms “comprises” and“comprising” should be interpreted as referring to elements, components,or steps, in a non-exclusive manner, indicating that the referencedelements, components, or steps may be present, or utilized, or combinedwith other elements, components, or steps that are not expresslyreferenced.

A person having ordinary skills in the art will appreciate that thesystem, modules, and sub-modules have been illustrated and explained toserve as examples and should not be considered limiting in any manner.It will be further appreciated that the variants of the above-disclosedsystem elements, or modules and other features and functions, oralternatives thereof, may be combined to create many other differentsystems or applications.

Those skilled in the art will appreciate that any of the aforementionedsteps and/or system modules may be suitably replaced, reordered, orremoved, and additional steps and/or system modules may be inserted,depending on the needs of a particular application. In addition, thesystems of the aforementioned embodiments may be implemented using awide variety of suitable processes and system modules and are notlimited to any particular computer hardware, software, middleware,firmware, microcode, etc.

The claims can encompass embodiments for hardware, software, or acombination thereof.

It will be appreciated that variants of the above disclosed, and otherfeatures and functions or alternatives thereof, may be combined intomany other different systems or applications. Various presentlyunforeseen or unanticipated alternatives, modifications, variations, orimprovements therein may be subsequently made by those skilled in theart which are also intended to be encompassed by the following claims.

The invention claimed is:
 1. A method of calculating error data inacoustic echo cancellation, the method comprising: storing receivedfar-end data in a first buffer; subsequent to the far-end data in thefirst buffer exceeding a predefined length, calculating echo-estimatedata using the stored far-end data; storing the echo estimate data in asecond buffer; receiving microphone data; and subsequent to sufficientecho estimate data being stored in the second buffer, calculating errordata by subtracting, from the microphone data, corresponding echoestimate data stored in the second buffer, thereby substantiallyavoiding a delay, caused by processing of the far-end data, incalculating the error data after reception of the microphone data;wherein the calculated error data is used by an acoustic echo cancellerfor use in cancelling acoustic echo.
 2. The method of claim 1, whereinthe length of the echo estimate data stored in the second buffer isgreater than or equal to the length of the received microphone data. 3.The method of claim 1 further comprising storing the error data in athird buffer.
 4. The method of claim 3 further comprising processing thestored error data when the error data in the third buffer exceeds thepredefined length.
 5. The method of claim 1, wherein one or more framesof the far-end data are divided into a first set of sub-frames of afirst size.
 6. The method of claim 1 further comprising: beforesufficient echo estimate data is stored in the second buffer,calculating the error data responsive to the reception of the microphonedata based on the microphone data and not based on the echo estimatedata.
 7. The method of claim 6, wherein if the error data is calculatedbased on the microphone data and not based on the echo estimate data,then the error data is not stored in the third buffer.
 8. The method ofclaim 1, wherein the corresponding echo estimate data is synchronized tothe microphone data.
 9. The method of claim 3, wherein Fast FourierTransformation is used to convert the stored error data to frequencydomain error data.
 10. The method of claim 9 wherein the frequencydomain error data is processed for updating coefficients of an adaptivefilter.
 11. A processing device configured to calculate error data in anacoustic echo canceller, the processing device comprising: a receivermodule configured to receive far-end data and microphone data; a firstbuffer configured to store the far-end data; an adaptive filteringmodule configured to calculate echo estimate data from the storedfar-end data subsequent to the far-end data in the first bufferexceeding a predefined length; a second buffer configured to store theecho estimate data; and a subtraction module configured to calculate theerror data subsequent to sufficient echo estimate data being stored inthe second buffer and responsive to the reception of the microphone databy subtracting, from the microphone data, corresponding echo estimatedata stored in the second buffer, thereby substantially avoiding adelay, caused by processing of the far-end data, in calculating theerror data after reception of the microphone data; wherein theprocessing device is configured to send the calculated error data foruse in cancelling acoustic echo.
 12. The processing device of claim 11,wherein the length of the echo estimate data stored in the second bufferis greater than or equal to the length of the received microphone data.13. The processing device of claim 11 further comprising a third bufferconfigured to store the error data.
 14. The processing device of claim11, wherein the receiver module is further configured to divide one ormore frames of the far-end data into a first set of sub-frames of afirst size.
 15. The processing device of claim 11, wherein theprocessing device is configured to calculate the error data beforesufficient echo estimate data is stored in the second buffer, responsiveto the reception of the microphone data based on the microphone data andnot based on the echo estimate data.
 16. The processing device of claim15, wherein the processing device is configured not to store the errordata in the third buffer if the error data is calculated based on themicrophone data and not based on the echo estimate data.
 17. Theprocessing device of claim 11 further comprising a Fast FourierTransformation module configured to convert the stored far-end data tofrequency domain far-end data.
 18. The processing device of claim 17,wherein the adaptive filtering module is further configured to calculatethe echo estimate data from the frequency domain far-end data.
 19. Theprocessing device of claim 13, wherein the Fast Fourier Transformationmodule is further configured to convert the stored error data tofrequency domain error data.
 20. A computer program product embodied ona non-transitory computer-readable storage medium and comprisingprocessor-executable instructions for calculating error data in acousticecho cancellation, that when executed cause a processor to: storereceived far-end data in a first buffer; subsequent to the far-end datain the first buffer exceeding a predefined length, calculateecho-estimate data using the stored far-end data; store the echoestimate data in a second buffer; receive microphone data; andsubsequent to sufficient echo estimate data being stored in the secondbuffer, calculate error data by subtracting, from the microphone data,corresponding echo estimate data stored in the second buffer, therebysubstantially avoiding a delay, caused by processing of the far-enddata, in calculating the error data after reception of the microphonedata; wherein the calculated error data is used by an acoustic echocanceller to cancel acoustic echo.